
export default {
  name: '基础仪表盘',
  icon: '/img/chart/gauge.png',
  type: '仪表盘',
  cptKey: 'gauge01',
  width: 500,
  height: 500,
  dynamic: true,
  options: {
    cptDataForm: {
      dataText: '[{"value": 65, "name": "速度"}]',
      dataSource: 1,
      pollTime: 0
    },
    attribute: {
      tooltip: {
        show: true,
        formatter: '{a} <br/>{b} : {c}%',
        formatterFn: ''
      },
      series: {
        radius: 90, // %
        startAngle: 180, // 圆心 正右手侧为0度，正上方为90度，正左手侧为180度
        endAngle: 0,
        min: 0,
        max: 240,
        splitNumber: 12, // 分割段数
        itemStyle: {
          color: '#58D9F9',
          borderColor: '',
          borderWidth: '',
          shadowColor: 'rgba(0,138,255,0.45)',
          shadowBlur: 10,
          shadowOffsetX: 2,
          shadowOffsetY: 2,
          opacity: 1
        },
        progress: {
          show: true,
          width: 10,
          roundCap: true // 圆角
        },
        axisLine: { // 仪表盘轴线相关配置。
          show: true,
          roundCap: true, // 是否在两端显示成圆形
          lineStyle: {
            width: 10,
            color: [[1, '#bec5de']],
            shadowColor: '',
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowOffsetY: 0,
            opacity: 1
          }
        },
        splitLine: { // 分隔线样式
          show: true,
          length: 10,
          distance: 10,
          lineStyle: {
            color: '#2CB5FC',
            width: 2,
            type: 'solid', // solid, dashed, dotted
            cap: 'butt', // 末端的绘制方式 butt round square
            shadowColor: '',
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowOffsetY: 0,
            opacity: 1
          }
        },
        axisTick: { // 刻度样式
          show: true,
          splitNumber: 5,
          length: 6,
          distance: 10,
          lineStyle: {
            color: '#2CB5FC',
            width: 1,
            type: 'solid', // solid, dashed, dotted
            cap: 'butt', // 末端的绘制方式 butt round square
            shadowColor: '',
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowOffsetY: 0,
            opacity: 1
          }
        },
        axisLabel: { // 刻度标签
          show: true,
          distance: 15,
          rotate: 0, // radial tangential
          formatter: '{value}/h', // '{value} kg'
          formatterFn: '',
          color: '#b8e7ff',
          fontSize: 12,
          textShadowColor: '',
          textShadowBlur: 0,
          textShadowOffsetX: 0,
          textShadowOffsetY: 0
        },
        pointer: {
          show: true,
          icon: '',
          length: 60, // %
          width: 6
        },
        title: { // 标题
          show: true,
          color: '#2CB5FC',
          fontSize: 16,
          offsetCenter: ['0', '20%'],
          textShadowColor : '',
          textShadowBlur: 10,
          textShadowOffsetX: 0,
          textShadowOffsetY: 0,
          opacity: 1,
        },
        detail: { // 数据详情
          show: true,
          color: '#2CB5FC',
          fontSize: 30,
          offsetCenter: ['0', '40%'],
          textShadowColor : '#2CB5FC',
          textShadowBlur: 10,
          textShadowOffsetX: 0,
          textShadowOffsetY: 0,
          opacity: 1,
          formatter: '',
          formatterFn: ''
        }
      }
    }
  }
}
